@echo off
 
set root=%~dp0%
set protoroot=%~dp0%/../proto
set pbout=%root%/../pb
call :build "%protoroot%/UserMsg.proto"
call :build "%protoroot%/Common.proto"
call :build "%protoroot%/Sentinel.proto"
call :build "%protoroot%/Node.proto"
pause
goto :eof

:build
setlocal
protoc   --go_out=plugins=grpc:%pbout% --go_opt=paths=source_relative --proto_path=%protoroot% %1

endlocal&goto :EOF
